/* 全局滚动条美化 */

/* 设置全局滚动条样式 */
::-webkit-scrollbar {
  width: 0;
  /* 默认隐藏滚动条 */
  height: 0;
  background: transparent;
}

/* 鼠标悬停在可滚动区域时显示滚动条 */
*:hover::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  transition: background-color 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.2);
}

/* 兼容Firefox等其他浏览器 */
* {
  scrollbar-width: none;
  /* 默认隐藏滚动条 */
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

/* 定义自定义滚动类，用于需要滚动但不显示滚动条的元素 */
.custom-scroll {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
  overflow-y: auto;
  overflow-x: hidden;

  &::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
  }
}

/* 指定可滚动区域的滚动控制 */
.scrollable-area {
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;

  /* 添加自定义滚动触发区域 */
  &::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 8px;
    height: 100%;
    background: transparent;
    z-index: 10;
    pointer-events: none;
  }

  /* 触摸设备优化 */
  @media (pointer: coarse) {
    -webkit-overflow-scrolling: touch;

    &::-webkit-scrollbar {
      width: 0;
    }
  }
}

/* 标题文本样式 */
.title-text {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #e74c3c !important;
  text-align: center !important;
  padding: 2px 0 8px 0 !important;
  margin: 0 !important;
  letter-spacing: 1px !important;
}

/* 热门标题样式 */
.hot-title {
  color: #e74c3c !important;
  font-weight: 600 !important;
  text-align: center !important;
  font-size: 16px !important;
  position: relative !important;
  padding: 4px 0 !important;
  margin: 0 0 6px 0 !important;

  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: #e74c3c;
  }
}